package com.sskj.qiangjin.presenter;

import com.lzy.okgo.model.Response;
import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.common.base.HttpData;
import com.sskj.common.util.ToastUtil;
import com.sskj.lib.bean.PageBean;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.lib.http.JsonConverter;
import com.sskj.qiangjin.bean.RechargeListBean;
import com.sskj.qiangjin.bean.RollMsg;
import com.sskj.qiangjin.bean.VcerifyBean;
import com.sskj.qiangjin.http.HttpConfig;
import com.sskj.qiangjin.ui.activity.CheckoutActivity;

import java.util.List;

import io.reactivex.Flowable;

/**
 * Created by QinKang on 2019/1/1.
 */

public class CheckoutPresenter extends BasePresenter<CheckoutActivity> {

    /**
     * 历史查询
     */
    public void toVcerify(String hash, String num) {
        httpService.vcerify(hash, num)
                .tag(this)
                .execute(new JsonCallBack<HttpData<PageBean<VcerifyBean>>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<PageBean<VcerifyBean>>> response) {
                        HttpData httpData = response.body();
//                        ToastUtil.showShort(httpData.msg);
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updataUI(response.body().getData().getList());
                        }
                    }
                });
    }
}
